<script setup lang="ts">
  import {ref} from "vue";


  const props = defineProps<{
    data: any,
    statusText: any
  }>()
  const data = props.data;
  const img = data.instrumentImgName != null ? data.instrumentImgName : data.instrumentImgs[0];
  //const statusText = makeStatus(data)
</script>

<template>
  <van-cell>
    <div style="display: flex; align-items: center;">
        <van-image width="3rem" height="3rem"  :src="`/api/src/img/${img}`" style="margin: 0 8px"/>

      <div style="flex: 1; display: flex; justify-content: space-between; align-items: center; margin-left: 10px;">
        <div style="display: flex; flex-direction: column;">
          <span style="font-weight: bold; font-size: 14px; color: black; text-align: left">{{ data.instrumentName }}</span>
          <span style="font-size: 12px; color: black">
            当前位置：{{ data.floorNumber }}层 {{ data.roomSubType }} {{ data.roomNumber }}
          </span>
        </div>

        <p :style="{ color: statusText.color, whiteSpace: 'nowrap'}" style="margin: 6px">
          {{ statusText.text }}
        </p>
      </div>
    </div>
  </van-cell>
</template>


<style scoped>

</style>